package dmcs.inventorysystem.view.beans;

import oracle.adf.model.BindingContext;
import oracle.adf.share.logging.ADFLogger;

import oracle.binding.BindingContainer;
import oracle.binding.OperationBinding;


public class EditBuildingBean {
    
    private static final ADFLogger LOG = ADFLogger.createADFLogger(EditBuildingBean.class);
    
    public EditBuildingBean() {
    }

    public BindingContainer getBindings() {
        return BindingContext.getCurrent().getCurrentBindingsEntry();
    }

    public String addFloor() {
        LOG.entering(getClass().getName(), "addFloor");
        BindingContainer bindings = getBindings();
     
        OperationBinding operationBinding = bindings.getOperationBinding("createInsertFloorRow");
        operationBinding.execute();
        if (!operationBinding.getErrors().isEmpty()) {
            return null;
        }
        LOG.exiting(getClass().getName(), "addFloor");
        return null;
    }
}
